var Page2={
    create:function () {
        var page={};
        page.ui=new PIXI.DisplayObjectContainer();

        var sp=Easy.CreateSprite('assets/images/bgEnd.png',0,0,0.0,0.0,1);
        page.ui.addChild(sp);

        var t0=Easy.CreateSprite('assets/images/end_t0.png',370,573,0.5,0.5,0);
        page.ui.addChild(t0);
        var t1=Easy.CreateSprite('assets/images/end_t1.png',370,641,0.5,0.5,0);
        page.ui.addChild(t1);
        var t2=Easy.CreateSprite('assets/images/end_t2.png',370,605,0.5,0.5,0);
        page.ui.addChild(t2);

        var t3=Easy.CreateSprite('assets/images/p0_t2.png',370,109,0.5,0.5,0);
        page.ui.addChild(t3);

        var logo=Easy.CreateSprite('assets/images/logo.png',689,1024,0.5,0.5,0);
        page.ui.addChild(logo);

        page.In=function () {
            t3.alpha=0;
            TweenMax.to(t3,1,{delay:0,alpha:1,ease:Cubic.easeInOut});

            t0.x=370+100;
            t0.alpha=0;
            TweenMax.to(t0,1,{delay:0.5,x:370,alpha:1,ease:Cubic.easeInOut});

            t1.alpha0;
            t1.x=370-100;
            TweenMax.to(t1,1,{delay:0.5,x:370,alpha:1,ease:Cubic.easeInOut});

            t2.alpha=0;
            TweenMax.to(t2,1,{delay:1,alpha:1,ease:Cubic.easeInOut});

            logo.alpha=0;
            TweenMax.to(logo,1,{delay:1.5,alpha:1,ease:Cubic.easeInOut});
        }
        page.Out=function () {
            TweenMax.killTweensOf(t0);
            TweenMax.killTweensOf(t1);
            TweenMax.killTweensOf(t2);
            TweenMax.killTweensOf(t3);
            TweenMax.killTweensOf(logo);

            TweenMax.to(page.ui,0.3,{alpha:0,onComplete:function () {
                page.ui.alpha=1;
                t0.alpha=0;
                t1.alpha=0;
                t2.alpha=0;
                t3.alpha=0;
                logo.alpha=0;
            }})
        }

        return page;
    }
}